package com.jna.unrar.jna;

import com.jna.unrar.bean.RARHeaderData;
import com.jna.unrar.bean.RARHeaderDataEx;
import com.jna.unrar.bean.RAROpenArchiveData;
import com.jna.unrar.bean.RAROpenArchiveDataEx;
import com.jna.unrar.callback.CHANGEVOLPROC;
import com.jna.unrar.callback.PROCESSDATAPROC;
import com.jna.unrar.callback.UNRARCALLBACK;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Pointer;


public interface CLibrary extends Library {
    CLibrary INSTANCE = Native.load("UnRAR.dll", CLibrary.class);

    Pointer  RAROpenArchive(RAROpenArchiveData ArchiveData);
    Pointer  RAROpenArchiveEx(RAROpenArchiveDataEx ArchiveData);
    int     RARCloseArchive(Pointer hArcData);
    int     RARReadHeader(Pointer hArcData, RARHeaderData HeaderData);
    int     RARReadHeaderEx(Pointer hArcData, RARHeaderDataEx HeaderData);
    int     RARProcessFile(Pointer hArcData,int Operation,String  DestPath,String  DestName);
    int     RARProcessFileW(Pointer hArcData,int Operation,String  DestPath,String  DestName);
    void    RARSetCallback(Pointer hArcData, UNRARCALLBACK Callback, long UserData);
    void    RARSetChangeVolProc(Pointer hArcData, CHANGEVOLPROC ChangeVolProc);
    void    RARSetProcessDataProc(Pointer hArcData, PROCESSDATAPROC ProcessDataProc);
    void    RARSetPassword(Pointer hArcData,char  Password);
    int     RARGetDllVersion();
}
